<?php
namespace App\Admin\Controllers\System\Traits;

use App\Wen\Utils\Settings;

trait pagesJsonTrait{

    private function get_pages_json_conten(){
        $page_json_str = '{
        ';
        $page_json_str .= $this->get_pages_string();
        $page_json_str .= $this->get_sub_packages();
        $page_json_str .= $this->get_preload_rule();
        $page_json_str .= $this->tabBar();
        $page_json_str .= $this->other();

        $page_json_str .= '
        }';
        return $page_json_str;
    }

    private function other(){
        return '
        "permission": {
		"scope.userLocation": {
			"desc": "你的位置信息将用于小程序位置接口的效果展示"
		}
	},
	"requiredBackgroundModes": [
		"audio",
		"location"
	],
	"sitemapLocation": "sitemap.json",
	"globalStyle":
	{
		"navigationBarTitleText": "",
		"enablePullDownRefresh": false,
		"onReachBottomDistance": 300,
		"navigationBarTextStyle": "black",
		"navigationBarBackgroundColor": "#f8f8f8",
		"backgroundColor": "#fafafa",
		"backgroundColorTop": "#fafafa",
		"backgroundColorBottom": "#fafafa",
        "app-plus": {
            "pullToRefresh": {
                "support": true,
                "style": "circle",
                "offset": "50px"
            }
        }
        // #ifdef MP-WEIXIN
        ,"usingComponents": {
          "mini-sph": "/wxcomponents/mini-sph/mini-sph"
        }
        // #endif
	}
        ';
    }

    private function tabBar(){
        $uni_tabbar_list = explode(',', Settings::get('uni_tabbar_list', '1,19,3,4,5'));
        if(_empty_($uni_tabbar_list)){
            exit('请先配置tabbar,并提交保存');
        }
        if(Settings::get('uni_tabbar_style', 1) == 2){
            $uni_list = '';
            $mp_list = '';
            $mid_button = '';

            for ($i = 0; $i < count($uni_tabbar_list); $i++){
                $dou = ',';
                if($i + 1 == count($uni_tabbar_list)){
                    $dou = '';
                }
                $i__ = $i + 1;
                if($uni_tabbar_list[$i] == 1){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/index/index",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/index/index",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 2){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/shop/shop",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/shop/shop",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 3){
                    $mid_button = '
                    ,"midButton": {
                        "width": "90px",
                        "iconWidth": "40px",
                        "iconPath": "/static/tabbar/fabu.png"
                    }
                    ';
                }else if($uni_tabbar_list[$i] == 4){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/notice/notice",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/notice/notice",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 5){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/mine/mine",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/mine/mine",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 19){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/circle/circle",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/circle/circle",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 50001){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/adopt/adopt",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/adopt/adopt",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 165){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/city/city",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/city/city",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 157){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/bureau/bureau",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/bureau/bureau",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 130){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/voter/voter",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/voter/voter",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 142){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/icons/icons",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/icons/icons",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 139){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/exhibit/exhibit",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/exhibit/exhibit",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 131){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/schedule/schedule",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/schedule/schedule",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 100){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/used/used",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/used/used",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 50){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/circleClass/circleClass",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/circleClass/circleClass",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 87){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/category/category",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/category/category",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }else if($uni_tabbar_list[$i] == 97){
                    $uni_list .= '
                    {
                    "pagePath": "pages/tabbar/add/add",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                    $mp_list .= '
                    {
                    "pagePath": "pages/tabbar/add/add",
                    "text": "'.Settings::get('uni_tabbar_style_'.$i__.'_text', '').'",
                    "iconPath": "static/tabbar/'.$i__.$i__.'.png",
                    "selectedIconPath": "static/tabbar/'.$i__.'.png"
                    }'.$dou;
                }
            }

            return '
    // #ifdef MP
    "tabBar": {
        "custom": true,
        "borderStyle": "white",
        "color": "#000000",
        "selectedColor": "#000000",
		"backgroundColor": "#ffffff",
		"height": "46px",
        "list": ['.$mp_list.']
    },
    // #endif
	// #ifdef APP || H5
	"tabBar": {
        "borderStyle": "white",
        "color": "#000000",
        "selectedColor": "#000000",
		"backgroundColor": "#ffffff",
		"height": "46px",
        "list": ['.$uni_list.']
        '.$mid_button.'
    },
	// #endif
    ';
        }else{
            $mp_list = '';
            $app_list = '';

            for ($i = 0; $i < count($uni_tabbar_list); $i++){
                $dou = ',';
                if($i + 1 == count($uni_tabbar_list)){
                    $dou = '';
                }
                if($uni_tabbar_list[$i] == 1){
                    $mp_list .= '{
                    "pagePath": "pages/tabbar/index/index"
                }'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/index/index",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue690",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5b"
				    }
			    }'.$dou;
                }else if($uni_tabbar_list[$i] == 2){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/shop/shop"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/shop/shop",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue689",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef61"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 3){

                }else if($uni_tabbar_list[$i] == 4){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/notice/notice"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/notice/notice",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue67b",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5d"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 5){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/mine/mine"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/mine/mine",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue676",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5c"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 19){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/circle/circle"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/circle/circle",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue686",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5e"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 50001){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/adopt/adopt"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/adopt/adopt",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue6bf",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\ue6bc"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 165){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/city/city"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/city/city",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue690",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5b"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 157){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/bureau/bureau"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/bureau/bureau",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue735",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\ue734"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 130){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/voter/voter"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/voter/voter",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue716",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\ue717"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 142){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/icons/icons"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/icons/icons",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue686",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5e"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 139){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/exhibit/exhibit"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/exhibit/exhibit",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue686",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5e"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 131){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/schedule/schedule"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/schedule/schedule",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue6de",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\ue6d8"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 100){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/used/used"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/used/used",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue6c0",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\ue6ba"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 50){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/circleClass/circleClass"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/circleClass/circleClass",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue686",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef5e"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 87){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/category/category"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/category/category",
				"iconfont": {
					"color": "#8C8C8C",
					"text": "\ue689",
					"fontSize": "17px",
					"selectedColor": "#323232",
					"selectedText": "\uef61"
				}
			}'.$dou;
                }else if($uni_tabbar_list[$i] == 97){
                    $mp_list .= '{
				"pagePath": "pages/tabbar/add/add"
			}'.$dou;
                    $app_list .= '
                {
				"pagePath": "pages/tabbar/add/add",
				"iconfont": {
					"color": "'.Settings::get('uni_color_primary', '#FC3A72').'",
					"text": "\ue674",
					"fontSize": "33px",
					"selectedColor": "'.Settings::get('uni_color_primary', '#FC3A72').'",
					"selectedText": "\ue674"
				}
			}'.$dou;
                }
            }
            return '
        // #ifdef MP
	"tabBar": {
		"custom": true,
		"fontSize": "20px",
		"color": "#999999",
		"selectedColor": "#333333",
		"borderStyle": "black",
		"backgroundColor": "#ffffff",
		"list": ['.$mp_list.'
		]
	},
	// #endif
	// #ifdef APP || H5
	"tabBar": {
		"custom": false,
		// "blurEffect":"extralight",
		"color": "#8C8C8C",
		"selectedColor": "#323232",
		"borderStyle": "white",
		"backgroundColor": "#ffffff",  // 故意设置背景白色，遮挡毛玻璃效果
		"iconfontSrc": "static/icon/B/iconfont.ttf",
		"iconWidth": "40px",
		"height": "46px",
		"list": ['.$app_list.']
		'.(in_array(3, $uni_tabbar_list) ? '
		,"midButton": {
			"width": "90px",
			"iconWidth": "40px",
			"iconPath": "/static/tabbar/fabu.png"
		}
		' : '').'
	},
	// #endif
        ';
        }
    }

    private function get_preload_rule(){
        $adopt = '';
        if(in_array(50001, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/adopt/adopt": {
          "network": "all",
          "packages": [
            "pagesP", "contrib"
          ]
        },';
        }
        if(in_array(165, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/city/city": {
          "network": "all",
          "packages": [
            "pages/sticky", "contrib"
          ]
        },';
        }
        if(in_array(157, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/bureau/bureau": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }

        if(in_array(130, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/voter/voter": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }

        if(in_array(142, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/icons/icons": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }

        if(in_array(139, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/exhibit/exhibit": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }
        if(in_array(131, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/schedule/schedule": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }
        if(in_array(100, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/used/used": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }
        if(in_array(87, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/category/category": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }
        if(in_array(97, $this->uni_tabbar_list)){
            $adopt .= '"pages/tabbar/add/add": {
          "network": "all",
          "packages": [
            "contrib"
          ]
        },';
        }
        return '
        "preloadRule": {
		"pages/tabbar/index/index": {
			"network": "all",
			"packages": ["pages/sticky","contrib"]
		},
		"pages/tabbar/mine/mine": {
			"network": "all",
			"packages": ["pages/sticky", "contrib"]
		},
        ' . $adopt . '
		"pages/sticky/sticky": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pages/common/search": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pages/circle/list": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pages/circle/circleaudit": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pages/tags/tags": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pages/user/user": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pagesA/shop/goods-details/posts": {
			"network": "all",
			"packages": ["contrib"]
		},
		"pages/message/detail/detail": {
			"network": "all",
			"packages": ["contrib"]
		}
	},
        ';
    }

    private function get_sub_packages(){

        $uni_tabbar_list = explode(',', Settings::get('uni_tabbar_list', '1,2,3,4,5'));
        $inner_list = '';
        if(true || !in_array(1, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "index/index",
              "style": {
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                  "post-list": "view",
                  "post-feedback": "view",
                  "scroll-nav": "view"
                }
              }
            }
            ';
        }
        if(true || !in_array(2, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "shop/shop",
              "style": {
                "navigationBarTextStyle": "black",
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                    "scroll-nav": "view"
                }
              }
            }
            ';
        }
        if(true || !in_array(4, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "notice/notice",
              "style": {
                "navigationStyle": "custom",
                "backgroundColor": "#ffffff",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                }
              }
            }
            ';
        }
        if(true || !in_array(5, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "mine/mine",
              "style": {
                "navigationBarTextStyle": "white",
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                  "post-list": "view",
                  "post-feedback": "view"
                }
              }
            }
            ';
        }
        if(true || !in_array(19, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "circle/circle",
              "style": {
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                  "post-list": "view",
                  "post-feedback": "view",
                  "scroll-nav": "view"
                }
              }
            }
            ';
        }

        if(true || !in_array(50001, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "adopt/adopt",
                "style": {
                    "navigationBarTextStyle": "black",
                    "enablePullDownRefresh": true,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {
                        "pet-adoption-home": "view",
                        "pet-adoption-home-navbar": "view"
                    }
                }
            }
            ';
        }
        if(true || !in_array(165, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "city/city",
                "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {
                        "post-list": "view",
                        "post-feedback": "view"
                    }
                }
            }
            ';
        }

        if(true || !in_array(157, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "bureau/bureau",
                "style": {
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                }
            }
            ';
        }

        if(true || !in_array(130, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "voter/voter",
                "style": {
                    "enablePullDownRefresh": true,
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                }
            }
            ';
        }

        if(true || !in_array(142, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "icons/icons",
                "style": {
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                }
            }
            ';
        }

        if(true || !in_array(139, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "exhibit/exhibit",
                "style": {
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                }
            }
            ';
        }

        if(true || !in_array(131, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "schedule/schedule",
                "style": {
                    "navigationBarTextStyle": "black",
                    "enablePullDownRefresh": true,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                }
            }
            ';
        }

        if(true || !in_array(100, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "used/used",
                "style": {
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                }
            }
            ';
        }

        if(true || !in_array(50, $uni_tabbar_list)) {
            if (!_empty_($inner_list)) {
                $inner_list .= ',';
            }
            $inner_list .= '
            {
                "path": "circleClass/circleClass",
                "style": {
                    "navigationBarTitleText": "广场",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {
                    }
                }
            }
            ';
        }

        if(true || !in_array(87, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "category/category",
              "style": {
                "navigationBarTitleText": "商品分类",
                "navigationStyle": "custom",
                "componentPlaceholder": {

                }
              }
            }
            ';
        }

        if(true || !in_array(97, $uni_tabbar_list)){
            if(!_empty_($inner_list)){
                $inner_list .= ',';
            }
            $inner_list .= '
            {
              "path": "add/add",
              "style": {
                "navigationBarTitleText": "",
				"navigationBarTextStyle": "black",
				"navigationStyle": "custom",
				"disableScroll": true,
                "componentPlaceholder": {

                }
              }
            }
            ';
        }

        $pages_tabbar = '
        {
          "root": "pages/tabbar_clone",
          "pages": ['.$inner_list.']
        },
        ';


        $pages_common = '
        {
			"root": "pages/common",
			"pages": [
                {
                  "path": "tenants",
                  "style": {
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "img",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "图片预览",
                    "enablePullDownRefresh": false,
                    "navigationBarTextStyle": "white",
                    "navigationBarBackgroundColor": "#000000",
                    "backgroundColor": "#000000",
                    "app-plus": {
                      "animationType": "fade-in",
                      "animationDuration": 300
                    },
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "report",
                  "style": {
                    "navigationBarTitleText": "举报",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": false,
                    "backgroundColor": "#FFFFFF",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "login",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "phone",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "video",
					"style": {
						"navigationStyle": "custom",
						"enablePullDownRefresh": false,
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "search",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "",
                    "componentPlaceholder": {
                      "post-list": "view",
                      "post-feedback": "view"
                    }
                  }
                },
                {
                  "path": "help",
                  "style": {
                    "navigationBarTitleText": "帮助",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "clause",
                  "style": {
                    "navigationBarTitleText": "",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "table",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "city",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				}
			]
		},
        ';
        $contrib = '
        {
			"root": "contrib",
			"pages": [
                {
                  "path": "test/test",
                  "style": {
                    "navigationBarTitleText": "",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';

        $pages_creat = '
        {
			"root": "pages/creat",
			"pages": [
				{
					"path": "index/index",
					"style": {
						"navigationBarTitleText": "发笔记",
						"navigationStyle": "custom",
						"enablePullDownRefresh": false,
						"app-plus": {
							"pullToRefresh": {
								"support": false,
								"style": "circle",
								"offset": "45px"
							}
						},
						"componentPlaceholder": {
                            "mini-upload-img": "view",
							"dom-video": "view"
						}
					}
				},
				{
					"path": "index/creat",
					"style": {
						"navigationBarTitleText": "发笔记",
						"navigationStyle": "custom",
						"enablePullDownRefresh": false,
						"app-plus": {
							"pullToRefresh": {
								"support": false,
								"style": "circle",
								"offset": "45px"
							}
						},
						"componentPlaceholder": {
							"mini-upload-img": "view",
							"dom-video": "view"
						}
					}
				},
				{
					"path": "index/video",
					"style": {
						"navigationBarTitleText": "上传视频",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {
							"dom-video": "view"
						}
					}
				},
				{
					"path": "voter/player/enter/enter",
					"style": {
						"navigationBarTitleText": "参与选票",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {
							"mini-upload-img": "view",
							"dom-video": "view"
						}
					}
				},
				{
					"path": "index/creat2",
					"style": {
						"navigationBarTitleText": "发笔记",
						"navigationStyle": "custom",
						"enablePullDownRefresh": false,
						"app-plus": {
							"pullToRefresh": {
								"support": false,
								"style": "circle",
								"offset": "45px"
							}
						},
						"componentPlaceholder": {
							"mini-upload-img": "view",
							"dom-video": "view"
						}
					}
				},
				{
					"path": "circle/circle",
					"style": {
						"navigationBarTitleText": "选择'.env('circle_call', '圈子').'",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "goods/goods",
					"style": {
						"navigationBarTitleText": "选择商品",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "tags/tags",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				}
			]
		},
        ';

        $pagesA = '
        {
			"root": "pagesA",
			"pages": [
				{
                  "path": "mine/address/address",
                  "style": {
                    "navigationBarTitleText": "收货地址",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/signtask/index",
                  "style": {
                    "navigationBarTitleText": "",
                    // "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/earnings/earnings",
                  "style": {
                    "navigationBarTitleText": "我的钱包",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/earnings/inspire/inspire",
					"style": {
						"navigationBarTitleText": "激励支持",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/earnings/inspire/inspire-rank",
					"style": {
						"navigationBarTitleText": "激励排行榜",
						"navigationStyle": "custom",
						"componentPlaceholder": {
						    "user-info": "view"
						}
					}
				},
                {
                  "path": "mine/order/order",
                  "style": {
                    "navigationBarBackgroundColor": "#fafafa",
                    "navigationBarTitleText": "支付消费记录",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/certification/certification",
                  "style": {
                    "navigationBarTitleText": "认证信息",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/circleaudit/circleaudit",
                  "style": {
                    "navigationBarTitleText": "管理我的'.env('circle_call', '圈子').'",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/editmine/editmine",
                  "style": {
                    "navigationBarTitleText": "个人信息",
                    "navigationStyle": "custom",
                    "backgroundColor": "#ffffff",
                    "navigationBarBackgroundColor": "#ffffff",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/editmine/accountbind",
					"style": {
						"navigationBarTitleText": "第三方账号",
						"navigationStyle": "custom",
						"backgroundColor": "#ffffff",
						"navigationBarBackgroundColor": "#ffffff",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/editmine/sphbind",
					"style": {
						"navigationBarTitleText": "视频号绑定",
						"navigationStyle": "custom",
						"backgroundColor": "#ffffff",
						"navigationBarBackgroundColor": "#ffffff",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "mine/lv/lv",
                  "style": {
                    "navigationBarTitleText": "等级说明",
                    "navigationStyle": "custom",
                    "backgroundColor": "#ffffff",
                    "navigationBarBackgroundColor": "#ffffff",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/members/members",
                  "style": {
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/about/about",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/follow/follow",
                  "style": {
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/users/users",
                  "style": {
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/earnings/inspire/ranking",
                  "style": {
                    "navigationBarTitleText": "余额排行榜",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/earnings/recharge/recharge",
                  "style": {
                    "navigationBarTitleText": "",
                    "enablePullDownRefresh": true,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/earnings/withdrawal/withdrawal",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/earnings/withdrawal/withdrawal-apply",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/earnings/withdrawal/record",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/earnings/bill/bill",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "mine/played/played",
                  "style": {
                    "navigationBarTitleText": "我的马甲",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/admin/index",
                  "style": {
                    "navigationBarTitleText": "管理端",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                        "scroll-nav": "view"
                    }
                  }
                },
                {
                  "path": "mine/logoff/logoff",
                  "style": {
                    "navigationBarTitleText": "账号注销",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/teenage/teenage",
					"style": {
						"navigationBarTitleText": "青少年模式",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/teenage/password",
					"style": {
						"navigationBarTitleText": "青少年模式-输入密码",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/teenage/forget",
					"style": {
						"navigationBarTitleText": "青少年模式-找回密码",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/teenage/service",
					"style": {
						"navigationBarTitleText": "青少年模式-找回密码-人工",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "mine/qrcode/qrcode",
                  "style": {
                    "navigationBarTitleText": "名片",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/admin/imgs",
                  "style": {
                    "navigationBarTitleText": "人工检测",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/paycode/paycode",
                  "style": {
                    "navigationBarTitleText": "支付密码",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/paycode/forget",
					"style": {
						"navigationBarTitleText": "忘记支付密码",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "mine/invite/invite",
                  "style": {
                    "navigationBarTitleText": "我的团队",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/invite/layer",
					"style": {
						"navigationBarTitleText": "裂变角色与即时奖励",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
					"path": "mine/invite/qr",
					"style": {
						"navigationBarTitleText": "我的二维码",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/invite/itc",
					"style": {
						"navigationBarTitleText": "推广码绑定",
						"navigationStyle": "custom",
						"componentPlaceholder": {
						    "user-info": "view"
						}
					}
				},
				{
					"path": "mine/privacy/privacy",
					"style": {
						"navigationBarTitleText": "隐私设置",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/privacy/collect",
					"style": {
						"navigationBarTitleText": "收藏隐私设置",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/privacy/follow",
					"style": {
						"navigationBarTitleText": "关注与粉丝列表",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/privacy/contact",
					"style": {
						"navigationBarTitleText": "联系方式",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/privacy/recomuser",
					"style": {
						"navigationBarTitleText": "推荐可能认识的人",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/privacy/personal",
					"style": {
						"navigationBarTitleText": "个性化选项",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/privacy/ad",
					"style": {
						"navigationBarTitleText": "程序化广告设置",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/diy/diy",
					"style": {
						"navigationBarTitleText": "界面自定义",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "mine/shield/shield",
                  "style": {
                    "navigationBarTitleText": "屏蔽设置",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/shield/users",
                  "style": {
                    "navigationBarTitleText": "用户列表",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/shield/posts",
                  "style": {
                    "navigationBarTitleText": "不喜欢的笔记",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/theme/theme",
                  "style": {
                    "navigationBarTitleText": "屏蔽设置",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "mine/visit/visit",
					"style": {
						"navigationBarTitleText": "浏览记录",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
					"path": "mine/realname/realname",
					"style": {
						"navigationBarTitleText": "实名认证",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "mine/unlock/unlock",
					"style": {
						"navigationBarTitleText": "解封",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "circle/creat/index",
                  "style": {
                    "navigationBarTitleText": "",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "mine/settings/settings",
                  "style": {
                    "navigationBarTitleText": "设置",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "shop/list/list",
					"style": {
						"navigationBarTitleText": "商品筛选",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "shop/apply/apply",
					"style": {
						"navigationBarTitleText": "店铺入驻",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "shop/contact/contact",
					"style": {
						"navigationBarTitleText": "经营地址",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "shop/cart/cart",
                  "style": {
                    "navigationBarTitleText": "购物袋",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
					"path": "shop/shop/shop",
					"style": {
						"navigationBarTitleText": "店铺",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "shop/shop/credent",
					"style": {
						"navigationBarTitleText": "店铺资质",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
                {
                  "path": "shop/order/order",
                  "style": {
                    "navigationBarTitleText": "SHOP订单",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "shop/goods-details/goods-details",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "shop/goods-classify/goods-classify",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "SHOP分类",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "shop/place-order/place-order",
                  "style": {
                    "navigationBarTitleText": "订单确认",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "shop/logistics/logistics",
                  "style": {
                    "navigationBarTitleText": "物流信息",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "shop/goods-details/posts",
                  "style": {
                    "navigationBarTitleText": "相关笔记",
                    "componentPlaceholder": {
                      "post-list": "view",
                      "post-feedback": "view"
                    }
                  }
                },
                {
					"path": "attestation/attestation",
					"style": {
						"navigationStyle": "custom"
					}
				},
				{
					"path": "attestation/notice",
					"style": {
						"navigationStyle": "custom"
					}
				},
				{
					"path": "attestation/modality",
					"style": {
						"navigationStyle": "custom"
					}
				},
				{
					"path": "attestation/byemail",
					"style": {
						"navigationStyle": "custom"
					}
				},
				{
					"path": "attestation/byschoolcard",
					"style": {
						"navigationStyle": "custom"
					}
				}
			]
		},
        ';
        $pagesB = '
        {
			"root": "pagesB",
			"pages": [
				{
                  "path": "playbill/goodsPoster",
                  "style": {
                    "navigationBarTitleText": "商品海报",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "playbill/userPoster",
                  "style": {
                    "navigationBarTitleText": "分享海报",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "playbill/circleShare",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "playbill/postPoster2",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "",
                    "enablePullDownRefresh": false,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "luckdraw/luckdraw",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "抽奖",
                    "app-plus": {
                      "scrollIndicator": "none"
                    },
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "tabs/tabs",
                  "style": {
                    "navigationBarTitleText": "",
                    "app-plus": {
                      "scrollIndicator": "none"
                    },
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "menus/menus",
                  "style": {
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "app-plus": {
                      "scrollIndicator": "none"
                    },
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "steps/steps",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "",
                    "app-plus": {
                      "scrollIndicator": "none"
                    },
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "compare/compare",
                  "style": {
                    "navigationBarTitleText": "授权说明",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "qrcode/qrcode",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "",
                    "app-plus": {
                      "scrollIndicator": "none"
                    },
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pagesC = '
        {
			"root": "pagesC",
			"pages": [
				{
                  "path": "realtime/post",
                  "style": {
                    "navigationBarTitleText": "热帖排行榜",
                    "enablePullDownRefresh": true,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "redirect/redirect",
                  "style": {
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "video/slide",
                  "style": {
                    "enablePullDownRefresh": false,
                    "navigationBarTitleText": "",
                    "navigationStyle": "custom",
                    "app-plus": {
                        "pullToRefresh": {
                            "support": false,
                            "style": "circle",
                            "offset": "45px"
                        }
                    },
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "promotion/post",
                  "style": {
                    "navigationBarTitleText": "笔记推广",
                    "enablePullDownRefresh": true,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pagesD = '
        {
			"root": "pagesD",
			"pages": [
			 ]
		},
        ';
        $pagesE = '
        {
			"root": "pagesE",
			"pages": [
				{
                  "path": "test/test",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                }
			 ]
		},
        ';
        $pagesN = '
        {
			"root": "pagesN",
			"pages": [
				{
					"path": "note/index/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				}
			]
		},
        ';

        $pagesP = '
        {
          "root": "pagesP",
          "pages": [
            {
              "path": "pet-adoption/index/index",
              "style": {
                "navigationBarTitleText": "",
                "navigationStyle": "custom",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/pet-filter/index",
              "style": {
                "navigationBarTitleText": "筛选",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/push-adoption/index",
              "style": {
                "navigationBarTitleText": "发布领养",
                "enablePullDownRefresh": false,
                "navigationStyle": "custom",
                "componentPlaceholder": {
                  "mini-upload-img": "view",
                  "dom-video": "view"
                }
              }
            },
            {
              "path": "pet-adoption/details/index",
              "style": {
                "navigationBarTitleText": "领养详情",
                "navigationStyle": "custom",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/blacklist/index",
              "style": {
                "navigationBarTitleText": "失信人举报和查询",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/report-push/index",
              "style": {
                "navigationBarTitleText": "发布举报",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/report-details/index",
              "style": {
                "navigationBarTitleText": "举报详情",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/blacklist-search/index",
              "style": {
                "navigationBarTitleText": "查询",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/adoptive-user-info-gather/index",
              "style": {
                "navigationBarTitleText": "领养人信息采集",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/pet-common-list/index",
              "style": {
                "navigationBarTitleText": "宠物通用列表",
                "componentPlaceholder": {

                }
              }
            },
            {
              "path": "pet-adoption/city-index-list/index",
              "style": {
                "navigationBarTitleText": "选择城市",
                "componentPlaceholder": {

                }
              }
            }
          ]
        },
        ';


        $pagesS = '
        {
			"root": "pagesS",
			"pages": [
				{
					"path": "sellers/sales/sales",
					"style": {
						"navigationBarTitleText": "我的卖出",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "sellers/deliver/deliver",
					"style": {
						"navigationBarTitleText": "商品发货",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "sellers/selfpick/selfpick",
					"style": {
						"navigationBarTitleText": "自提-用户",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "sellers/guarantee/guarantee",
					"style": {
						"navigationBarTitleText": "店铺保证金",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				}
			 ]
		},
        ';

        $pagesU = '
        {
			"root": "pagesU",
			"pages": [
				{
					"path": "points-mall/list/index",
					"style": {
						"navigationBarTitleText": "积分商城",
						"enablePullDownRefresh": false,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "points-mall/group-goods-list/index",
					"style": {
						"navigationBarTitleText": "全部商品",
						"enablePullDownRefresh": false,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "used-mall/home/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "used-mall/detail/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "used-mall/issue/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": false,
						"componentPlaceholder": {
						    "mini-upload-img": "view"
						}
					}
				},
				{
					"path": "used-mall/search/search",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "used-mall/mine/published/published",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				}
			 ]
		},
        ';



        $pagesV = '
        {
			"root": "pagesV",
			"pages": [
				{
					"path": "voter/detail/detail",
					"style": {
						"navigationBarTitleText": "选票详情",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {
						    "mp-html": "view"
						}
					}
				},
				{
					"path": "voter/list/list",
					"style": {
						"navigationBarTitleText": "选票列表",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "voter/detail/player",
					"style": {
						"navigationBarTitleText": "选手展示",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "voter/template/list/list",
					"style": {
						"navigationBarTitleText": "模板中心",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "voter/creat/creat",
					"style": {
						"navigationBarTitleText": "发布选票",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {
							"l-clipper": "view",
							"banner-editor": "view"
						}
					}
				}
			]
		},
		';

        $pagesZ = '
        {
			"root": "pagesZ",
			"pages": [
				{
					"path": "organize-bureau/index/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true
					}
				},
				{
					"path": "organize-bureau/details/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {
							"mp-html": "view"
						}
					}
				},
				{
					"path": "organize-bureau/join/index",
					"style": {
						"navigationBarTitleText": "确认加入",
						"navigationStyle": "custom"
					}
				},
				{
					"path": "organize-bureau/settle-in/index",
					"style": {
						"navigationBarTitleText": "",
						"navigationStyle": "custom",
						"componentPlaceholder": {
							"l-clipper": "view"
						}
					}
				},
				{
					"path": "organize-bureau/push/creat",
					"style": {
						"navigationStyle": "custom",
						"navigationBarTitleText": "",
						"componentPlaceholder": {
							"mini-upload-img": "view"
						}
					}
				},
				{
					"path": "organize-bureau/push/team",
					"style": {
						"navigationBarTitleText": ""
					}
				},
				{
					"path": "organize-bureau/push/userInfo",
					"style": {
						"navigationStyle": "custom",
						"navigationBarTitleText": "",
						"componentPlaceholder": {
							"mini-upload-img": "view"
						}
					}
				},
				{
					"path": "organize-bureau/my-list/index",
					"style": {
						"navigationBarTitleText": "我的组局",
						"navigationStyle": "custom"
					}
				},
				{
					"path": "organize-bureau/album/album",
					"style": {
						"navigationBarTitleText": "活动图集",
						"navigationStyle": "custom"
					}
				},
				{
					"path": "organize-bureau/album/detail",
					"style": {
						"navigationBarTitleText": "图集",
						"navigationStyle": "custom"
					}
				},
				{
					"path": "organize-bureau/club/club",
					"style": {
						"navigationBarTitleText": "俱乐部主页",
						"navigationStyle": "custom"
					}
				},
				{
					"path": "organize-bureau/club/setting",
					"style": {
						"navigationBarTitleText": "俱乐部设置",
						"navigationStyle": "custom"
					}
				},
				{
					"path": "organize-bureau/poster/poster",
					"style": {
						"navigationBarTitleText": "组局海报",
						"enablePullDownRefresh": false,
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				}
			]
		},
        ';

        $pages_sticky = '
        {
			"root": "pages/sticky",
			"pages": [
				{
                  "path": "sticky",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pages_circleClass = '
        {
			"root": "pages/circleClass",
			"pages": [
				{
                  "path": "circleClass",
                  "style": {
                    "navigationStyle": "custom",
                    "navigationBarTitleText": "所有'.env('circle_call', '圈子').'",
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pages_article = '
        {
			"root": "pages/article",
			"pages": [
				{
                  "path": "article",
                  "style": {
                    "navigationBarTitleText": "热门话题",
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pages_message = '
        {
			"root": "pages/message",
			"pages": [
				{
                  "path": "detail/detail",
                  "style": {
                    "navigationBarTitleText": "聊天详情",
                    "navigationBarBackgroundColor": "#fafafa",
                    "navigationStyle": "custom",
                    "app-plus": {
                      "softinputNavBar": "none",
                      "bounce": "none"
                    },
                    "componentPlaceholder": {
                      "user-info": "view"

                    }
                  }
                },
                {
                  "path": "likeAndfav/likeAndfav",
                  "style": {
                    "navigationBarTitleText": "赞和收藏",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "comment/comment",
                  "style": {
                    "navigationBarTitleText": "评论和充电",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "notice/notice",
                  "style": {
                    "navigationBarTitleText": "收到的通知",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "activityList/activityList",
                  "style": {
                    "navigationBarTitleText": "活动",
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pages_circle = '
        {
			"root": "pages/circle",
			"pages": [
				{
                  "path": "circleaudit",
                  "style": {
                    "navigationBarTitleText": "审贴",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {
                      "post-list": "view",
                      "post-feedback": "view"
                    }
                  }
                },
                {
                  "path": "list",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {
                      "post-list": "view",
                      "post-feedback": "view"
                    }
                  }
                }
			]
		},
        ';
        $pages_rank = '
        {
			"root": "pages/rank",
			"pages": [
				{
					"path": "rank",
					"style": {
						"navigationBarTitleText": "全站排行榜",
						"navigationStyle": "custom",
						"componentPlaceholder": {
							"user-info": "view"
						}
					}
				}
			]
		},
        ';
        $pages_tags = '
        {
			"root": "pages/tags",
			"pages": [
				{
                  "path": "list",
                  "style": {
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "tags",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {
                      "post-list": "view",
                      "post-feedback": "view"
                    }
                  }
                }
			]
		},
        ';
        $pages_help = '
        {
			"root": "pages/help",
			"pages": [
				{
                  "path": "feedbackIndex/feedbackIndex",
                  "style": {
                    "navigationBarTitleText": "意见反馈",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "feedbackList/feedbackList",
                  "style": {
                    "navigationBarTitleText": "意见反馈",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "feedback/feedback",
                  "style": {
                    "navigationBarTitleText": "意见反馈",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "helpDetail/helpDetail",
                  "style": {
                    "navigationBarTitleText": "帮助详情",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                },
                {
                  "path": "feedbackDetail/feedbackDetail",
                  "style": {
                    "navigationBarTitleText": "反馈详情",
                    "enablePullDownRefresh": false,
                    "navigationStyle": "custom",
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pages_pay = '
        {
			"root": "pages/pay",
			"pages": [
                {
                  "path": "pay-order",
                  "style": {
                    "navigationBarTitleText": "支付",
                    "componentPlaceholder": {

                    }
                  }
                }
			]
		},
        ';
        $pages_wallpaper = '
        {
			"root": "pages/wallpaper",
			"pages": [
				{
					"path": "index",
					"style": {
						"navigationBarTextStyle": "black",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "collected",
					"style": {
						"navigationBarTextStyle": "black",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "creat",
					"style": {
						"navigationBarTextStyle": "black",
						"navigationStyle": "custom",
						"componentPlaceholder": {
						    "mini-upload-img": "view"
						}
					}
				},
				{
					"path": "list",
					"style": {
						"navigationBarTextStyle": "black",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				},
				{
					"path": "detail",
					"style": {
						"navigationBarTextStyle": "white",
						"navigationStyle": "custom",
						"componentPlaceholder": {

						}
					}
				}
			]
		},
        ';
        $pages_web_view = '
        {
			"root": "pages/web-view",
			"pages": [
                {
                    "path": "index",
                    "style": {
                        "enablePullDownRefresh": false,
                        "navigationBarTextStyle": "black",
                        "navigationBarTitleText": "'.Settings::get('app_title', '宠也').'",
                        "app-plus": {
                            "pullToRefresh": {
                                "support": false,
                                "style": "circle",
                                "offset": "45px"
                            }
                        },
                        "componentPlaceholder": {

                        }
                    }
                }
			]
		},
        ';

        $pages_user = '
        {
			"root": "pages/user",
			"pages": [
				{
                  "path": "user",
                  "style": {
                    "navigationBarTextStyle": "black",
                    "navigationStyle": "custom",
                    "enablePullDownRefresh": true,
                    "componentPlaceholder": {
                      "post-list": "view",
                      "post-feedback": "view"
                    }
                  }
                },
                {
					"path": "used/used",
					"style": {
						"navigationBarTextStyle": "black",
						"navigationStyle": "custom",
						"enablePullDownRefresh": true,
						"componentPlaceholder": {}
					}
				}
			]
		},
        ';

        $pageX = '
        {
			"root": "pagesX/mayi/movie",
			'.(Settings::get('mini_plugin_ant_movie_switch', 0) == 1 ? '"plugins": {
				"mayi-movie": {
					"version": "1.0.22",
					"provider": "wx459759608c80cf98"
				}
			},' : '').'
			"pages": [{
				"path": "test",
				"style": {
					"navigationBarTitleText": "",
					"navigationStyle": "custom",
					"componentPlaceholder": {

					}
				}
			}]
		}
        ';

        return '"subPackages": [
        '.$pages_tabbar.$pages_common.$contrib.$pages_creat.$pagesA.$pagesB.$pagesC.$pagesD.
            $pagesE.$pagesN.$pagesP.$pagesS.$pagesU.$pagesV.$pagesZ.$pages_sticky.$pages_circleClass.
            $pages_article.$pages_message.$pages_circle.$pages_rank.$pages_tags.
            $pages_help.$pages_pay.$pages_wallpaper.$pages_web_view.$pages_user.$pageX.'
            ],';
    }

    private function get_pages_string(){

        $uni_tabbar_list = explode(',', Settings::get('uni_tabbar_list', '1,2,3,4,5'));

        $pages_tabbar_index_index = '
            {
			"path": "pages/tabbar/index/index",
			"style": {
				"navigationStyle": "custom",
				"enablePullDownRefresh": true,
				"navigationBarTextStyle": "black",
				"componentPlaceholder": {
					"post-list": "view",
		            "scroll-nav": "view",
		            "post-feedback": "view"
				}
			}
		},
        ';

        $pages_guide_guide = '
        //#ifdef APP-PLUS
		{
			"path": "pages/guide/guide",
			"style": {
				"enablePullDownRefresh": false,
                "navigationStyle": "custom",
                "app-plus": {
                  "contentAdjust": false,
                  "bounce": "none"
                },
                "componentPlaceholder": {

                }
			}
		},
		// #endif
        ';

        $pages_tabbar_circle_circle = '
        {
			"path": "pages/tabbar/circle/circle",
			"style": {
				"navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                  "scroll-nav": "view"
                }
			}
		},
        ';
        $pages_tabbar_shop_shop = '
        {
			"path": "pages/tabbar/shop/shop",
			"style": {
				"navigationBarTextStyle": "black",
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                   "scroll-nav": "view"
                }
			}
		},
        ';
        $pages_tabbar_category_shop = '
        {
			"path": "pages/tabbar/category/category",
			"style": {
                "navigationBarTitleText": "商品分类",
                "navigationStyle": "custom",
                "componentPlaceholder": {

                }
			}
		},
        ';
        $pages_tabbar_notice_notice = '
        {
            "path": "pages/tabbar/notice/notice",
            "style": {
                "navigationStyle": "custom",
                "backgroundColor": "#ffffff",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                }
            }
        },
        ';
        $pages_tabbar_mine_mine = '
        {
			"path": "pages/tabbar/mine/mine",
			"style": {
				"navigationBarTextStyle": "black",
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {
                  "post-list": "view",
                  "post-feedback": "view"
                }
			}
		},
        ';

        $pages_tabbar_adopt_adopt = '
        {
			"path": "pages/tabbar/adopt/adopt",
			"style": {
                "navigationBarTextStyle": "black",
                "navigationStyle": "custom",
                "componentPlaceholder": {
                    "pet-adoption-home": "view",
                    "pet-adoption-home-navbar": "view"
                }
			}
		},
        ';

        $pages_tabbar_city_city = '
        {
			"path": "pages/tabbar/city/city",
			"style": {
                "navigationBarTextStyle": "black",
				"navigationStyle": "custom",
				"enablePullDownRefresh": true,
				"componentPlaceholder": {
					"post-list": "view",
					"post-feedback": "view"
				}
			}
		},
        ';

        $pages_tabbar_bureau_bureau = '
        {
			"path": "pages/tabbar/bureau/bureau",
			"style": {
                "navigationBarTitleText": "",
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {

                }
			}
		},
        ';


        $pages_tabbar_voter_voter = '
        {
			"path": "pages/tabbar/voter/voter",
			"style": {
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {

                }
			}
		},
        ';

        $pages_tabbar_icons_icons = '
        {
			"path": "pages/tabbar/icons/icons",
			"style": {
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {

                }
			}
		},
        ';

        $pages_tabbar_exhibit_exhibit = '
        {
			"path": "pages/tabbar/exhibit/exhibit",
			"style": {
                "navigationStyle": "custom",
				"enablePullDownRefresh": true,
				"componentPlaceholder": {

				}
			}
		},
        ';

        $pages_tabbar_schedule_schedule = '
        {
			"path": "pages/tabbar/schedule/schedule",
			"style": {
                "enablePullDownRefresh": true,
                "navigationStyle": "custom",
                "componentPlaceholder": {

                }
			}
		},
        ';

        $pages_tabbar_used_used = '
        {
			"path": "pages/tabbar/used/used",
			"style": {
                "navigationBarTitleText": "",
                "navigationStyle": "custom",
                "enablePullDownRefresh": true,
                "componentPlaceholder": {

                }
			}
		},
        ';

        $pages_tabbar_circleClass_circleClass = '
        {
			"path": "pages/tabbar/circleClass/circleClass",
			"style": {
                "navigationBarTitleText": "广场",
                "navigationStyle": "custom",
                "componentPlaceholder": {

                }
			}
		},
        ';

        $pages_tabbar_add_add = '
        {
			"path": "pages/tabbar/add/add",
			"style": {
                "navigationBarTitleText": "",
				"navigationBarTextStyle": "black",
				"navigationStyle": "custom",
				"disableScroll": true,
                "componentPlaceholder": {

                }
			}
		},
        ';

        $pages_pc_login_index = '
        {
			"path": "pages/pc-login/index",
			"style": {
				"navigationBarTitleText": "",
                "componentPlaceholder": {
                }
			}
		},
        ';
        $pages_template_test = '{
			"path": "pages/template/test",
			"style": {
				"navigationBarTitleText": "",
                "componentPlaceholder": {
                }
			}
		}';

        if(!in_array(2, $uni_tabbar_list)){
            $pages_tabbar_shop_shop = '';
        }
        if(!in_array(19, $uni_tabbar_list)){
            $pages_tabbar_circle_circle = '';
        }
        if(!in_array(50001, $uni_tabbar_list)){
            $pages_tabbar_adopt_adopt = '';
        }
        if(!in_array(165, $uni_tabbar_list)){
            $pages_tabbar_city_city = '';
        }
        if(!in_array(157, $uni_tabbar_list)){
            $pages_tabbar_bureau_bureau = '';
        }
        if(!in_array(130, $uni_tabbar_list)){
            $pages_tabbar_voter_voter = '';
        }
        if(!in_array(142, $uni_tabbar_list)){
            $pages_tabbar_icons_icons = '';
        }
        if(!in_array(139, $uni_tabbar_list)){
            $pages_tabbar_exhibit_exhibit = '';
        }
        if(!in_array(131, $uni_tabbar_list)){
            $pages_tabbar_schedule_schedule = '';
        }
        if(!in_array(100, $uni_tabbar_list)){
            $pages_tabbar_used_used = '';
        }

        if(!in_array(50, $uni_tabbar_list)){
            $pages_tabbar_circleClass_circleClass = '';
        }

        if(!in_array(87, $uni_tabbar_list)){
            $pages_tabbar_category_shop = '';
        }

        if(!in_array(97, $uni_tabbar_list)){
            $pages_tabbar_add_add = '';
        }


        if($uni_tabbar_list[0] == 1){

        }else if($uni_tabbar_list[0] == 2){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_shop_shop;
            $pages_tabbar_shop_shop = $tmp;
        }else if($uni_tabbar_list[0] == 3){

        }else if($uni_tabbar_list[0] == 4){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_notice_notice;
            $pages_tabbar_notice_notice = $tmp;
        }else if($uni_tabbar_list[0] == 5){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_mine_mine;
            $pages_tabbar_mine_mine = $tmp;
        }else if($uni_tabbar_list[0] == 19){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_circle_circle;
            $pages_tabbar_circle_circle = $tmp;
        }else if($uni_tabbar_list[0] == 50001){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_adopt_adopt;
            $pages_tabbar_adopt_adopt = $tmp;
        }else if($uni_tabbar_list[0] == 165){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_city_city;
            $pages_tabbar_city_city = $tmp;
        }else if($uni_tabbar_list[0] == 157){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_bureau_bureau;
            $pages_tabbar_bureau_bureau = $tmp;
        }else if($uni_tabbar_list[0] == 130){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_voter_voter;
            $pages_tabbar_voter_voter = $tmp;
        }else if($uni_tabbar_list[0] == 142){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_icons_icons;
            $pages_tabbar_icons_icons = $tmp;
        }else if($uni_tabbar_list[0] == 139){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_exhibit_exhibit;
            $pages_tabbar_exhibit_exhibit = $tmp;
        }else if($uni_tabbar_list[0] == 131){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_schedule_schedule;
            $pages_tabbar_schedule_schedule = $tmp;
        }else if($uni_tabbar_list[0] == 100){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_used_used;
            $pages_tabbar_used_used = $tmp;
        }else if($uni_tabbar_list[0] == 50){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_circleClass_circleClass;
            $pages_tabbar_circleClass_circleClass = $tmp;
        }else if($uni_tabbar_list[0] == 87){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_category_shop;
            $pages_tabbar_category_shop = $tmp;
        }else if($uni_tabbar_list[0] == 97){
            $tmp = $pages_tabbar_index_index;
            $pages_tabbar_index_index = $pages_tabbar_add_add;
            $pages_tabbar_add_add = $tmp;
        }

        return '"pages": [
        '.$pages_tabbar_index_index.$pages_guide_guide.$pages_tabbar_circle_circle.$pages_tabbar_city_city.$pages_tabbar_adopt_adopt.$pages_tabbar_bureau_bureau.$pages_tabbar_voter_voter.$pages_tabbar_icons_icons.$pages_tabbar_exhibit_exhibit.$pages_tabbar_schedule_schedule.$pages_tabbar_used_used.$pages_tabbar_circleClass_circleClass.$pages_tabbar_shop_shop.$pages_tabbar_category_shop.$pages_tabbar_notice_notice.$pages_tabbar_mine_mine
            .$pages_tabbar_add_add.$pages_pc_login_index.$pages_template_test.'
            ],';
    }
}
